<!-- 3 -->
<script lang='ts' setup>
// @ts-nocheck
import { useRoute } from 'vue-router'
import { changeState, getDetailEx } from '@/api/request'
import { useGlobalStore } from '@/store/GlobalStore/index'
const store=useGlobalStore()
const route = useRoute()
const router=useRouter()
const name=store.userInfo.username
const rid = ref('')
const tid = ref('')
const sid = route.query.sid
const cid=store.userInfo.cid

const ws = new WebSocket(`ws://210.44.37.172:8082/message?id=${sid}&role=student`)
ws.onopen = function (e) {
	console.log('连接成功')
	// console.log('断开之前')
	// setTimeout(() => {
	// 	ws.close()
	// }, 3000)
	// console.log('断开了')
	// ws.send(
	// 	// '{"rid":"2002","tid":"3000","kid":"3000","value":"3.33","timeStamp":"3.2.3"}'
	// 	`{"role":"student","sourceId":"${sid}","eid":"3","rid":"${rid.value}","destId":"${tid.value}","kid":"k3","value":"3.33","timeStamp":"3.2.3"}`
	// )
}
ws.onmessage = function (e) {
	console.log(e.data, '接收返回的消息')
}
ws.onclose = function () {
	console.log('连接关闭')
}
ws.onerror = function () {
	console.log('连接出错')
}

onMounted(() => {
	console.log('组件挂载')

	rid.value = route.query.id
	tid.value = route.query.tid
	console.log('sid', sid, 'rid', rid.value, 'tid', tid.value)
	const jwtToken = localStorage.getItem('jwtToken')
	// 拿到保存的实验数据
	getDetailEx(jwtToken, 3, rid.value).then((res) => {
		console.log(res.data.data[0], 'socket数据')
		model.value.forEach((element) => {
			var obj = element
			var kid = obj.kid
			if (res.data.data[0].hasOwnProperty(kid)) {
				obj.value = res.data.data[0][kid]
				obj.timeStamp = res.data.data[0]['t' + kid]
			}
		})
	})
})
// 填每一个空的时间
const fillTime = ref([])
// 失去焦点时触发事件记录时间
const getTime = function (index) {
	model.value[index].timeStamp = new Date().toLocaleString()
	// 处理model数组的数据
	model.value = model.value.map((item) => ({
		role: 'student',
		sourceId: sid,
		rid: rid.value,
		destId: tid.value,
		eid: '3',
		kid: item.kid,
		// 返回这个对象中第一个属性的value值
		value: item.value,
		timeStamp: item.timeStamp,
	}))
	console.log('输出的', model.value)
	ws.send(
		// '{"rid":"2002","tid":"3000","kid":"3000","value":"3.33","timeStamp":"666666666"}'
		`${JSON.stringify(model.value[index])}`
	)
	console.log(model.value[index], '填的空')
}
// 提交
const apply = function () {
	// console.log('提交')
	// storage()
	model.value = model.value.map((item) => ({
		rid: rid.value,
		tid: tid.value,
		kid: Object.keys(item)[0],
		// 返回这个对象中第一个属性的value值
		value: item[Object.keys(item)[0]],

		timeStamp: item.timeStamp,
	}))
	changeState(jwtToken, rid, 1).then((res) => {
		console.log(res)
	})
	console.log(model.value, '提交成功')
	ElMessage.success('提交成功')
}
const model = ref([
    { kid: 'k1', value: '', timeStamp: '' },
    { kid: 'k2', value: '', timeStamp: '' },
    { kid: 'k3', value: '', timeStamp: '' },
    { kid: 'k4', value: '', timeStamp: '' },
    { kid: 'k5', value: '', timeStamp: '' },
    { kid: 'k6', value: '', timeStamp: '' },
    { kid: 'k7', value: '', timeStamp: '' },
    { kid: 'k8', value: '', timeStamp: '' },
    { kid: 'k9', value: '', timeStamp: '' },
    { kid: 'k10', value: '', timeStamp: '' },
    { kid: 'k11', value: '', timeStamp: '' },
    { kid: 'k12', value: '', timeStamp: '' },
    { kid: 'k13', value: '', timeStamp: '' },
    { kid: 'k14_1', value: '', timeStamp: '' },
    { kid: 'k14_2', value: '', timeStamp: '' },
    { kid: 'k14_3', value: '', timeStamp: '' },
    { kid: 'k14_4', value: '', timeStamp: '' },
    { kid: 'k14_5', value: '', timeStamp: '' },
    { kid: 'k14_6', value: '', timeStamp: '' },
    { kid: 'k14_7', value: '', timeStamp: '' },
    { kid: 'k15_1', value: '', timeStamp: '' },
    { kid: 'k15_2', value: '', timeStamp: '' },
    { kid: 'k15_3', value: '', timeStamp: '' },
    { kid: 'k15_4', value: '', timeStamp: '' },
    { kid: 'k15_5', value: '', timeStamp: '' },
    { kid: 'k15_6', value: '', timeStamp: '' },
    { kid: 'k16_1', value: '', timeStamp: '' },
    { kid: 'k16_2', value: '', timeStamp: '' },
    { kid: 'k16_3', value: '', timeStamp: '' },
    { kid: 'k16_4', value: '', timeStamp: '' },
    { kid: 'k16_5', value: '', timeStamp: '' },
    { kid: 'k16_6', value: '', timeStamp: '' },
    { kid: 'k17_1', value: '', timeStamp: '' },
    { kid: 'k17_2', value: '', timeStamp: '' },
    { kid: 'k17_3', value: '', timeStamp: '' },
    { kid: 'k17_4', value: '', timeStamp: '' },
    { kid: 'k17_5', value: '', timeStamp: '' },
    { kid: 'k17_6', value: '', timeStamp: '' },
    { kid: 'k17_7', value: '', timeStamp: '' },
    { kid: 'k18_1', value: '', timeStamp: '' },
    { kid: 'k18_2', value: '', timeStamp: '' },
    { kid: 'k18_3', value: '', timeStamp: '' },
    { kid: 'k18_4', value: '', timeStamp: '' },
    { kid: 'k18_5', value: '', timeStamp: '' },
    { kid: 'k18_6', value: '', timeStamp: '' },
    { kid: 'k19_1', value: '', timeStamp: '' },
    { kid: 'k19_2', value: '', timeStamp: '' },
    { kid: 'k19_3', value: '', timeStamp: '' },
    { kid: 'k19_4', value: '', timeStamp: '' },
    { kid: 'k19_5', value: '', timeStamp: '' },
    { kid: 'k19_6', value: '', timeStamp: '' },
    { kid: 'k20', value: '', timeStamp: '' },
    { kid: 'k21', value: '', timeStamp: '' },
    { kid: 'k22', value: '', timeStamp: '' },
    { kid: 'k23_1', value: '', timeStamp: '' },
    { kid: 'k23_2', value: '', timeStamp: '' },
    { kid: 'k23_3', value: '', timeStamp: '' },
    { kid: 'k23_4', value: '', timeStamp: '' },
    { kid: 'k23_5', value: '', timeStamp: '' },
    { kid: 'k23_6', value: '', timeStamp: '' },
    { kid: 'k23_7', value: '', timeStamp: '' },
    { kid: 'k24_1', value: '', timeStamp: '' },
    { kid: 'k24_2', value: '', timeStamp: '' },
    { kid: 'k24_3', value: '', timeStamp: '' },
    { kid: 'k24_4', value: '', timeStamp: '' },
    { kid: 'k24_5', value: '', timeStamp: '' },
    { kid: 'k24_6', value: '', timeStamp: '' },
    { kid: 'k25_1', value: '', timeStamp: '' },
    { kid: 'k25_2', value: '', timeStamp: '' },
    { kid: 'k25_3', value: '', timeStamp: '' },
    { kid: 'k25_4', value: '', timeStamp: '' },
    { kid: 'k25_5', value: '', timeStamp: '' },
    { kid: 'k25_6', value: '', timeStamp: '' },
    { kid: 'k26', value: '', timeStamp: '' },
    { kid: 'k27', value: '', timeStamp: '' },
    
])

</script>
<template>
    <div class="paper-wrap">
        <n-card>
            <!-- 学生信息 -->
            <div class="paper-title">
                <h2>钢体转动惯量的测定</h2>
                <div class="stu-info">
                    <div class="stu-info-item">
                        <span>学号：</span>
                        <span>{{sid}}</span>
                    </div>
                    <div class="stu-info-item">
                        <span>姓名：</span>
                        <span>{{name}}</span>
                    </div>
                    <div class="stu-info-item">
                        <!-- <span>班级：</span>
                        <span>{{cid}}</span> -->
                    </div>
                </div>
            </div>
            <!-- 实验的基本信息 -->
            <n-divider title-placement="left">
                <h2>一、实验目的</h2>
            </n-divider>
            <div class="paper-purpose">
                <ol>
                    <li>
                        <el-input v-model="model[0].value" placeholder="第一条" @blur="getTime(0)"></el-input>
                    </li>
                    <li> <el-input v-model="model[1].value" placeholder="第二条" @blur="getTime(1)"></el-input> </li>
                </ol>
            </div>
            <n-divider title-placement="left">
                <h2>二、实验仪器</h2>
            </n-divider>
            <div class="paper-instrument">
                <el-input v-model="model[2].value" placeholder="请填写需要的实验仪器" @blur="getTime(2)"></el-input>
            </div>
            <n-divider title-placement="left">
                <h2>三、实验原理</h2>
            </n-divider>
            <div class="paper-principle">
                <p class="principles"> 写出实验基本原理级公式，并画出原理图 </p>
            </div>

            <n-divider title-placement="left">
                <h2>四、数据记录与处理</h2>
            </n-divider>
            <h3>（一）基本量测量</h3>
            <div class="paper-data">
                <!-- 第一个表单 -->
                <ul id="firstul">
                    <li>
                        钢圆环的质量M<sub>钢环</sub>=<span id="f2"><el-input v-model="model[3].value" @blur="getTime(3)" ></el-input></span>kg;
                        钢圆盘的质量M<sub>钢盘</sub>=<span id="f2"><el-input v-model="model[4].value" @blur="getTime(4)" ></el-input></span>kg;
                    </li>
                    <li>
                        钢圆环内半径R<sub>内</sub>=D<sub>内</sub>/2=<span id="f2"><el-input v-model="model[5].value" @blur="getTime(5)" ></el-input></span>m,
                        外半径R<sub>外</sub>=D<sub>外</sub>/2=<span id="f2"><el-input v-model="model[6].value" @blur="getTime(6)" ></el-input></span>m;
                    </li>
                    <li>
                        绕线转轴直径D<sub>轴</sub>=<span id="f2"><el-input v-model="model[7].value" @blur="getTime(7)" ></el-input></span>m;
                        半径r=D<sub>轴</sub>/2=<span id="f2"><el-input v-model="model[8].value" @blur="getTime(8)" ></el-input></span>m;
                    </li>
                    <li>
                        销子内侧间距d<sub>1</sub>=<span id="f2"><el-input v-model="model[9].value" @blur="getTime(9)" ></el-input></span>m,
                        外侧间距d<sub>2</sub>=<span id="f2"><el-input v-model="model[10].value" @blur="getTime(10)" ></el-input></span>m,
                        平移距离d=(d<sub>1</sub>+d<sub>2</sub>)/2=<span id="f2"><el-input v-model="model[11].value" @blur="getTime(11)" ></el-input></span>m;
                    </li>
                    <li>砝码下落距离h=<span id="f2"><el-input v-model="model[12].value" @blur="getTime(12)" ></el-input></span>m.</li>
                </ul>
                <h3>（二）测定铝环和支架系统的转动惯量</h3>
                <table border="1" cellpadding="2" style="
						width: 100%;
						border-collapse: collapse;
						border: 2px solid #000;
					" class="ntable">
                    <thead>
                        <tr>
                            <th colspan="2">砝码</th>
                            <th colspan="4">t/s</th>
                            <th colspan="2">J<sub>0</sub>/(kgm<sup>2</sup>)</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="w-50 m-2">数量/个</td>
                            <td class="w-50 m-2">m/kg</td>
                            <td class="w-50 m-2">t<sub>01</sub></td>
                            <td class="w-50 m-2">t<sub>02</sub></td>
                            <td class="w-50 m-2">t<sub>03</sub></td>
                            <td class="w-50 m-2">平均t<sub>0</sub></td>
                            <td class="w-50 m-2">J<sub>01</sub></td>
                            <td class="w-50 m-2">平均J<sub>0</sub></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">1</td>
                            <td class="w-50 m-2"><el-input v-model="model[13].value" class="w-50 m-2" @blur="getTime(13)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[14].value" class="w-50 m-2" @blur="getTime(14)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[15].value" class="w-50 m-2" @blur="getTime(15)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[16].value" class="w-50 m-2" @blur="getTime(16)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[17].value" class="w-50 m-2" @blur="getTime(17)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[18].value" class="w-50 m-2" @blur="getTime(18)" /></td>
                            <td class="w-50 m-2" rowspan="3"><el-input v-model="model[19].value" class="w-50 m-2" @blur="getTime(19)" /></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">2</td>
                            <td class="w-50 m-2"><el-input v-model="model[20].value" class="w-50 m-2" @blur="getTime(20)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[21].value" class="w-50 m-2" @blur="getTime(21)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[22].value" class="w-50 m-2" @blur="getTime(22)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[23].value" class="w-50 m-2" @blur="getTime(23)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[24].value" class="w-50 m-2" @blur="getTime(24)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[25].value" class="w-50 m-2" @blur="getTime(25)" /></td>                         
                        </tr>
                        <tr>
                            <td class="w-50 m-2">3</td>
                            <td class="w-50 m-2"><el-input v-model="model[26].value" class="w-50 m-2" @blur="getTime(26)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[27].value" class="w-50 m-2" @blur="getTime(27)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[28].value" class="w-50 m-2" @blur="getTime(28)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[29].value" class="w-50 m-2" @blur="getTime(29)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[30].value" class="w-50 m-2" @blur="getTime(30)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[31].value" class="w-50 m-2" @blur="getTime(31)" /></td>                   
                        </tr>
                    </tbody>
                </table>
            </div>
            <!-- 第二个表单 -->
            <h3>(三)测定钢圆环的转动惯量</h3>
            <table border="1" cellpadding="2" style="
						width: 100%;
						border-collapse: collapse;
						border: 2px solid #000;
					" class="ntable">
                    <thead>
                        <tr>
                            <th colspan="2">砝码</th>
                            <th colspan="4">t/s</th>
                            <th colspan="2">J<sub>0</sub>/(kgm<sup>2</sup>)</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="w-50 m-2">数量/个</td>
                            <td class="w-50 m-2">m/kg</td>
                            <td class="w-50 m-2">t<sub>1</sub></td>
                            <td class="w-50 m-2">t<sub>2</sub></td>
                            <td class="w-50 m-2">t<sub>3</sub></td>
                            <td class="w-50 m-2">平均t<sub></sub></td>
                            <td class="w-50 m-2">J<sub>i</sub></td>
                            <td class="w-50 m-2">平均J<sub>1</sub></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">3</td>
                            <td class="w-50 m-2"><el-input v-model="model[32].value" class="w-50 m-2" @blur="getTime(32)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[33].value" class="w-50 m-2" @blur="getTime(33)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[34].value" class="w-50 m-2" @blur="getTime(34)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[35].value" class="w-50 m-2" @blur="getTime(35)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[36].value" class="w-50 m-2" @blur="getTime(36)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[37].value" class="w-50 m-2" @blur="getTime(37)" /></td>
                            <td class="w-50 m-2" rowspan="3"><el-input v-model="model[38].value" class="w-50 m-2" @blur="getTime(38)" /></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">4</td>
                            <td class="w-50 m-2"><el-input v-model="model[39].value" class="w-50 m-2" @blur="getTime(39)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[40].value" class="w-50 m-2" @blur="getTime(40)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[41].value" class="w-50 m-2" @blur="getTime(41)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[42].value" class="w-50 m-2" @blur="getTime(42)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[43].value" class="w-50 m-2" @blur="getTime(43)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[44].value" class="w-50 m-2" @blur="getTime(44)" /></td>                         
                        </tr>
                        <tr>
                            <td class="w-50 m-2">5</td>
                            <td class="w-50 m-2"><el-input v-model="model[45].value" class="w-50 m-2" @blur="getTime(45)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[46].value" class="w-50 m-2" @blur="getTime(46)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[47].value" class="w-50 m-2" @blur="getTime(47)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[48].value" class="w-50 m-2" @blur="getTime(48)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[49].value" class="w-50 m-2" @blur="getTime(49)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[50].value" class="w-50 m-2" @blur="getTime(50)" /></td>                   
                        </tr>
                    </tbody>
                </table>
            <div>钢圆环的转动惯量 J<sub>钢环实验</sub>=J<sub>1</sub>-J<sub>0</sub>=
                <span id="f2"><el-input v-model="model[51].value" @blur="getTime(51)" ></el-input></span>
                k•gm<sup>2</sup>
            </div>
            <div style="margin-top: 10px;">J<sub>钢环理论</sub>=M<sub>钢环</sub>(R<sub>内</sub><sup>2</sup>+R<sub>外</sub><sup>2</sup>)•(1/2) =
                <span id="f2"><el-input v-model="model[52].value" class="w-10 m-2" @blur="getTime(52)"/></span>
                k•gm<sup>2</sup></div>
            <div style="margin-top: 10px;">相对误差E<sub>1</sub>=
                |J<sub>钢环实验</sub>-J<sub>钢环理论</sub>| / J<sub>钢环理论</sub>=<span id="f2"><el-input v-model="model[53].value" class="w-10 m-2" @blur="getTime(53)"/></span>%</div>
            <h3>(四)验证转动惯量平行轴定理</h3>
                <table border="1" cellpadding="2" style="
						width: 100%;
						border-collapse: collapse;
						border: 2px solid #000;
					" class="ntable">
                    <thead>
                        <tr>
                            <th colspan="2">砝码</th>
                            <th colspan="4">t/s</th>
                            <th colspan="2">J<sub>0</sub>/(kgm<sup>2</sup>)</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="w-50 m-2">数量/个</td>
                            <td class="w-50 m-2">m/kg</td>
                            <td class="w-50 m-2">t<sub>1</sub></td>
                            <td class="w-50 m-2">t<sub>2</sub></td>
                            <td class="w-50 m-2">t<sub>3</sub></td>
                            <td class="w-50 m-2">平均t<sub></sub></td>
                            <td class="w-50 m-2">J<sub>i</sub></td>
                            <td class="w-50 m-2">平均J<sub>2</sub></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">2</td>
                            <td class="w-50 m-2"><el-input v-model="model[54].value" class="w-50 m-2" @blur="getTime(54)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[55].value" class="w-50 m-2" @blur="getTime(55)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[56].value" class="w-50 m-2" @blur="getTime(56)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[57].value" class="w-50 m-2" @blur="getTime(57)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[58].value" class="w-50 m-2" @blur="getTime(58)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[59].value" class="w-50 m-2" @blur="getTime(59)" /></td>
                            <td class="w-50 m-2" rowspan="3"><el-input v-model="model[60].value" class="w-50 m-2" @blur="getTime(60)" /></td>
                        </tr>
                        <tr>
                            <td class="w-50 m-2">3</td>
                            <td class="w-50 m-2"><el-input v-model="model[61].value" class="w-50 m-2" @blur="getTime(61)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[63].value" class="w-50 m-2" @blur="getTime(63)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[64].value" class="w-50 m-2" @blur="getTime(64)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[65].value" class="w-50 m-2" @blur="getTime(65)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[66].value" class="w-50 m-2" @blur="getTime(66)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[67].value" class="w-50 m-2" @blur="getTime(67)" /></td>                         
                        </tr>
                        <tr>
                            <td class="w-50 m-2">4</td>
                            <td class="w-50 m-2"><el-input v-model="model[68].value" class="w-50 m-2" @blur="getTime(68)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[69].value" class="w-50 m-2" @blur="getTime(69)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[70].value" class="w-50 m-2" @blur="getTime(70)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[71].value" class="w-50 m-2" @blur="getTime(71)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[72].value" class="w-50 m-2" @blur="getTime(72)" /></td>
                            <td class="w-50 m-2"><el-input v-model="model[73].value" class="w-50 m-2" @blur="getTime(73)" /></td>                   
                        </tr>
                    </tbody>
                </table>
                <div>钢圆盘绕质心轴的转动惯量J<sub>钢盘c</sub>=
                    <span style="text-decoration: overline;">J</span><sub>2</sub>
                    -<span style="text-decoration: overline;">J</span><sub>0</sub>=
                    <span id="f2"><el-input v-model="model[74].value" class="w-10 m-2" @blur="getTime(74)"/></span>
                </div>
                <h2>五、实验分析</h2>
                <n-divider title-placement="left">
                
            </n-divider>
            <div class="paper-analyze">
            </div>
            <div class="btn-group">
                <n-button type="info" @click="router.back()"> 保存并退出 </n-button>
                <router-link to="/">
                    <n-button type="success" @click="apply"> 提交 </n-button>
                </router-link>
            </div>
        </n-card>
    </div>
</template>

<style lang="scss" scoped>
.paper-title {
    .stu-info {
        display: flex;
        align-items: center;

        .stu-info-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 10px;
        }
    }
}
#firstul{
    li{
        margin-top: 10px;
    }
}
.ntable {
    margin: 10px;

    thead {
        background-color: #999;

        th {
            width: 100px;
            height: 50px;
            line-height: 50px;
            border: 2px solid black;
        }
    }

    tr {
        td {
            width: 100px;
            height: 50px;
            border: 2px solid black;
        }
    }
}

.paper-purpose {
    li {
        margin-top: 10px;
    }

}

.form1 {
    .form-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 10px;

        .input-group {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;

            .input {
                width: 100%;
            }
        }
    }
}
#f2 {
        display: inline-block;
        width: 100px;
        margin-right: 10px;
}
table {
    margin: 10px;

    tr {
        td {
            text-align: center;
            padding: 10px;

            input {
                width: 100%;
                height: 100%;
                //border: none;
                outline: none;
                text-align: center;
                box-sizing: border-box;

                &:focus {
                    border-radius: 5px;
                    border: 1px solid #000;
                }
            }
        }
    }
}

.btn-group {
    // 右下角
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin: 10px;

    .n-button {
        margin-left: 10px;
    }
}</style>